package com.example.mapper;

import com.example.dto.WSCheckDto;
import com.example.entity.WSCheck;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface WSCheckMapper {
    @Select("select * from wscheck where dno like concat('%',#{dno},'%')")
    Page<WSCheck> getByDno(WSCheckDto wsCheckDto);

    @Insert("insert into wscheck (dno, ch_time, ch_result) VALUE (#{dno},#{chTime},#{chResult})")
    void add(WSCheck wsCheck);

    @Delete("delete from wscheck where dno = #{dno}")
    void deleteByDno(String dno);

    void update(WSCheck wsCheck);
}
